﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

using Data;

namespace Business
{

    public class ListaComentario
    {
        private List<Comentario> listaComentarios;

        private DataComentario dataLayer;

        public ListaComentario()
        {
            this.listaComentarios = new List<Comentario>();
            this.dataLayer = new DataComentario();
        }

        public ListaComentario(List<Comentario> listaComentarios)
        {
            this.listaComentarios = listaComentarios;
            this.dataLayer = new DataComentario();
        }

        public ListaComentario(ListaComentario l)
        {
            this.listaComentarios = l.getListaComentarios();
            this.dataLayer = new DataComentario();
        }

        public List<Comentario> getListaComentarios() { return this.listaComentarios; }
        public DataComentario getDataLayer() { return this.dataLayer; }

        public void addComment(Comentario c)
        {
            this.listaComentarios.Add(c);
        }

        public ListaComentario getListaComentarios(int eventID, int status)
        {
            return this.dataLayer.getListaComentarios(eventID, status);
        }

        public ListaComentario getListaComentariosUser(int eventoID, int status, int userID)
        {
            return this.dataLayer.getListaComentariosUser(eventoID, status, userID);
        }
    }

}